package Duotai;

class shape{
    void draw(){
        System.out.println("打印一个园");
    }
}
class sanjiao extends shape{
    void draw(){
        System.out.println("打印一个三角");
    }
}
class fang extends shape{
    void draw(){
        System.out.println("打印一个长方形");
    }
}


public class chongxie {
    public static void main(String[] args) {
        shape a= new sanjiao();
        a.draw();
        shape b = new fang();
        b.draw();
        shape c = new shape();
        c.draw();
    }
}
